package com.sptpc.demo.vo;

import com.sptpc.demo.model.Category;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.joda.money.Money;

import java.io.Serializable;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
public class DrinkWIthCategoryVo implements Serializable {
    private Long id;

    private String name;

    private Money price;

    private Category category; // Drink * -> 1 Category

}
// 1. sql
//    select d.id id, d.name name, price, tc.id cid, tc.name cname
//    from t_drink d inner join t_category tc on d.category_id = tc.id

//2. map orm转换规则
//
